<extend name="Layout/dialog" />
<block name="css"></block>
<block name="style"></block>
<block name="js"></block>
<block name="script"></block>
<block name="model">基本设置</block>
<block name="controller">版本管理</block>
<block name="action">编辑版本信息</block>
<block name="desc"></block>
<block name="content">
<div class="box box-danger">
	<div class="box-header with-border">
		<h3 class="box-title">编辑版本信息</h3>
	</div>
	<notempty name="data">
	<form class="form-horizontal" action="{:U('save')}" method="post" rel-action="form" rel-success="reload()">
	<div class="box-body">
		
		<div class="form-group">
			<label class="col-sm-2 control-label"><span class="text-red">*</span>业务类型</label>
			<div class="col-sm-10">
				<select class="form-control" rel-action="select" name="type_id">
					<option value="0">请选择业务类型</option>
					<volist name="type" id="item">
					<if condition="$item.type_id == $data['version_type_id']">
						<option value="{$item.type_id}" selected>{$item.type_name}</option>
					<else />
						<option value="{$item.type_id}">{$item.type_name}</option>
					</if>
					</volist>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label"><span class="text-red">*</span>版本号</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="release" value="{$data.version_release}" placeholder="请输入版本号,例：1.0.0.1"  autocomplete="off">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label"><span class="text-red">*</span>内部版本</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="code" value="{$data.version_code}" placeholder="请输入内部版本,例：1001"  autocomplete="off">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label"><span class="text-red">*</span>密钥</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="key" value="{$data.version_key}" placeholder="请输入密钥"  autocomplete="off">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">提示信息</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="message" value="{$data.version_message}" placeholder="请输入提示信息"  autocomplete="off">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">描述</label>
			<div class="col-sm-10">
				<textarea type="text" class="form-control" name="description" value="" placeholder="请输入描述"  autocomplete="off">{$data.version_description}</textarea>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">下载地址</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" name="download" value="{$data.version_download}" placeholder="请输入下载地址"  autocomplete="off">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label"><span class="text-red">*</span>设备名称</label>
			<div class="col-sm-10 radio">
				<label>
					<if condition="$data.version_platform == Android">
						<input type="radio" name="platform" value="Android" checked="checked">Android
					<else />
						<input type="radio" name="platform" value="Android">Android
					</if>
				</label>
				<label>
					<if condition="$data.version_platform == IOS">
						<input type="radio" name="platform" value="IOS" checked="checked">IOS
					<else />
						<input type="radio" name="platform" value="IOS">IOS
					</if>
				</label>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">是否通知</label>
			<div class="col-sm-10 radio">
				<label>
					<if condition="$data.version_notice == 1">
						<input type="radio" name="notice" value="1" checked="checked">是
					<else />
						<input type="radio" name="notice" value="1">是
					</if>
				</label>
				<label>
					<if condition="$data.version_notice == 0">
						<input type="radio" name="notice" value="0" checked="checked">否
					<else />
						<input type="radio" name="notice" value="0">否
					</if>
				</label>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">状态</label>
			<div class="col-sm-10 radio">
				<label>
					<if condition="$data.version_status == 1">
						<input type="radio" name="status" value="1" checked="checked">正常
					<else />
						<input type="radio" name="status" value="1">正常
					</if>
				</label>
				<label>
					<if condition="$data.version_status == 0">
						<input type="radio" name="status" value="0" checked="checked">锁定
					<else />
						<input type="radio" name="status" value="0">锁定
					</if>
				</label>
			</div>
		</div>
	</div>
	<input type="hidden" name="id" value="{$data.version_id}">
	<div class="box-footer">
		<div class="col-sm-offset-2 col-sm-10">
			<button type="submit" class="btn btn-default">保存</button>
			<button type="button" class="btn btn-default" rel-action="dialog-close">关闭</button>
		</div>
	</div>
	</form>
	</notempty>
	<empty name="data">
	<div class="box-body">
		<div class="alert alert-error alert-dismissible">
			<h4><i class="icon fa fa-warning"></i>暂无记录</h4>
			参数有误
		</div>
	</div>
	</empty>
</div>
</block>